surface: Ensure min_position < max_position in _get_min_max_positions