add test for bug when sort_call is called on StepFunctio with empty x
debug: check i != x.end() first, prevent *i on empty i.begin()