bugfix: recursive location rewrite