EZP-21920: Fix wrong locations + add assertions