Issue #2954467: Fixed issues with the [masquerade] Permission Denied when trying to masquerade when baseUrl is not /