[Shadow DOM] Backport a minor fix found by PubRules Checker.