Finally making FIlterSQP work with the C root-finding