factor out FunctionSimplifier#take_required