Allow macro expansion on class methods

Fixes #632