Fix canOpenDoors to avoid cycle