Replace BaseUri with matched path
Fixes T162