Fixed IsDeadEndOrCorner