Fix expansion of macros inside other patterns