We were only matching RHS being a loop invariant value, not the inverse. Since there's nothing which appears to canonicalize loop invariant values to RHS, this means we missed cases.
Note: There's partial overlap between this transform and LFTR. That may worthy some deeper thinking, but for the moment, let's leave the design as is, and just make it work properly.