Correctly stringify! types and paths inside macros

Closes #8709