Completed extent implementation.
Fixed minmax_cost_element when first == last.