Set flags of the result in convert_unit_to

Closes #2409