fix the direction of the has_access check
Merge pull request #288 from eve-val/mask-correctness

fix the direction of the has_access check