Fixes has_access_to_entity() and get_access_array()

This also fixes #7155 as it relies on has_access_to_entity() while logged out and with ignore access on!
When get_access_array() was written there was no can_access_entity(), and hence no reason to ever need to create a full query when logged out.