Extend support for nested guards to handle nested guards with selectors