Only require selector/_loader when DOM present. Fixes #17138.