Portal.cshtml redirects wrongly to NoAccess.cshtm when an application is configured in it's virtual directory and moreover NoAccess.cshtml isn't included in application templace (setup)

I was trying to …
login as user without any roles (no menu items)

I was expecting …
to get nice error screen

Instead I’ve got …
Ugly error screen

I installed clean app using project wizard on 2016.11 setup package

Corrected in Master and merged into 2016.11.