EZP-20933: cleanup
EZP-20933: Added a functional test for a possible edge case