Simply and speed up precompiled url generation checks

Avoid looking up and recompiling same path multiple times