Move tf_select before the tf_res bits.