Fix view-registrations if accessing e.g. on subsites.

@maethu 

Fix if accessing the views from e.g. a subsite.