Fix handling of access checks.