Tidy up new dofmap builder code.