(#11133) If a node definition uses a regex, make its capture variables available in the node's scope