Fix some bugs with the AclAwareTableGateway