Generalize mark_special_return_data mechanism.