Fixed an bad transformation caused by macros

A function's return type can be a macro, so check it before
rewriting