Merge from upstream: 	Prevent the permission check from causing a permission violation