dof_id_type error fixes for Paul's patch

More bugfixes to follow later; this was just the minimum to get it
compiling in 64-bit