Fix ICE with nested macro_rules!-style macros

Fixes #10536.