[Shadow DOM] Fix errors found by PubRules Checker.