Bug fixes to DGFEMContext