Avoid calling getVariables() too many times, MPS-19166
Avoid filtering blocks by block kind, MPS-19166
Avoid iterating over inequalities within a cycle causing O(n^2) performance, MPS-19166