Made sure the UrlGenerator::previous method returns null, if the request doesn't have a Referer header.