Added flag for switching between new and old path resolution behaviour.