  
    // if the first component is invalid, they
    // are all invalid
-@@ -590,7 +723,13 @@
+@@ -590,7 +723,21 @@
    // otherwise the index is the first component
    // index augemented by the component number
    else

+					    next_free_dof);
+		      next_free_dof += (vg_description.n_variables()*
+					node->n_comp_group(sys_num,vg));
+		    }
+		}
+	    }

           continue;
         }
     }
@@ -1055,6 +1059,9 @@
 
 #ifdef DEBUG
   {
+    // std::cout << "next_free_dof=" << next_free_dof << std::endl
+    // 	      << "_n_SCALAR_dofs=" << _n_SCALAR_dofs << std::endl;
+
     // Make sure we didn't miss any nodes
     MeshTools::libmesh_assert_valid_procids<Node>(mesh);
 
@@ -1064,13 +1071,13 @@
       {
 	Node *obj = *node_it;
 	libmesh_assert(obj);
