Enforce structured programming in line_search