Fix EZP-20949: Fatal error on versionview permission check 

3rd attempt to fix [EZP-20949](https://jira.ez.no/browse/EZP-20949)...