Besides stripping out the package loads mentioned by Jürgen, I had to switch AMSMath (Document > Settings > Math Options) from automatic to manual load (because the \dfrac command, which requires it, is in ERT). Once I did that, the document compiled.
Paul
