Do you mean that you change the rules since I got the java rewrite engine branch and the third rule should match the front of the list instead of the end of the list?

However, if the second rule happens only when (Offset =/=Int 0) andBool (Offset2 <=Int Offset), what about the cases when (Offset =/=Int 0) andBool (Offset1 >Int Offset)?