Turn off base path inclusion when the referrer is generated. In the case where there is no referrer header, we need to omit the base path as redirect() will add one in. Including a base path causes apps in sub-directories to behave incorrectly. Refs #7205
as it can be misunderstood by some IDE and static analysis tools.
This would cause for example the `assertTemplate()` to fail if the route is define with 'prefix' => false