Fix race condition in local rename refactoring

The local rename refactoring could cause a race condition (running a
presentation compiler method outside the PC thread), now it's safely
wrapped inside an ask call.