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

(No topic branch, as neither I nor my thirdline mentor could get those to work on my repo.)