put a limit on Macro depth (to combat recursion) (issue #5114)