Fix EZP-21959: Security: Siteaccess matching is loose, in legacy stack

https://jira.ez.no/browse/EZP-21959

(No topic branch, as neither I nor my thirdline mentor could get those to work on my repo.)