math: fix new handle_conditional_rl() code