              }
          } // end loop on elements
  
-@@ -1172,27 +1170,30 @@
+@@ -1172,27 +1174,30 @@
  	    Node *node = *node_it;
  	    libmesh_assert(node);
  

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

   //-------------------------------------------------------------------------
   // First count and assign temporary numbers to local dofs
   MeshBase::element_iterator       elem_it  = mesh.active_local_elements_begin();
@@ -964,45 +954,52 @@
       for (unsigned int n=0; n<n_nodes; n++)
         {
           Node* node = elem->get_node(n);
