          continue;
  
        MeshBase::element_iterator       elem_it  = mesh.active_local_elements_begin();
-@@ -1115,7 +1112,7 @@
+@@ -1115,7 +1116,7 @@
  
  	  // ... and only variables which are active on
  	  // on this element's subdomain

+	ncg = this->n_comp_group(s,vg),
+	vig = this->system_var_to_vg_var(s,vg,var);
+
+      return (base_idx + vig*ncg + comp);
+    }
 }
 
 
@@ -639,6 +778,87 @@
 }
 
 

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