Fixes #336 caused by $ in locations being interpreted as group references