diff --git a/kerncraft/cacheprediction.py b/kerncraft/cacheprediction.py
index <HASH>..<HASH> 100755
--- a/kerncraft/cacheprediction.py
+++ b/kerncraft/cacheprediction.py
@@ -83,12 +83,14 @@ class LayerConditionPredictor(CachePredictor):
                         raise ValueError("Only one loop counter may appear per term. "
                                          "Problematic term: {}.".format(t))
                     else:  # len(idx) == 1
+                        idx = idx.pop()
                         # Check that number of multiplication match access order of iterator
-                        stride_dim = len(t.as_ordered_factors())
-                        #if loop_stack[len(loop_stack)-stride_dim]['index'] != idx.pop().name:
-                        #    raise ValueError("Number of multiplications in index term does not "
-                        #                     "match loop counter order. "
-                        #                     "Problematic term: {}.".format(t))
+                        pow_dict = {k: v for k, v in t.as_powers_dict().items() if k != idx}
+                        stride_dim = sum(pow_dict.values())
+                        if loop_stack[-stride_dim-1]['index'] != idx.name:
+                            raise ValueError("Number of multiplications in index term does not "
+                                             "match loop counter order. "
+                                             "Problematic term: {}.".format(t))
 
         # 3. Indices may only increase with one
         # TODO use a public interface, not self.kernel._*
improved compatibility check in layer condition predictor