Fix EZP-20949: Fatal error on versionview permission check

Additional fix as the 2 previous one (9984a39 and af78727) didn't cover
all cases.
Merge pull request #688 from ezsystems/ezp_20949

Fix EZP-20949: Fatal error on versionview permission check