BZ-881036 - Infinite Loop limit in Guvnor test scenarios

(cherry picked from commit 2bafe2da67249ae1fd21da2c834fee83ff6131c2)