Fix race condition with external resources localization

Closes #82