Fix of bug 14011217 Locator crash on 2nd run

Related refactoring