Properly caching building of path.