Feature/#6441 prefix path resolver

Ping @ojhaujjwal

This is a rewrite of #6441