Fixed #18551 -- Enabled skipIfDBFeature/skipUnlessDBFeature to decorate a class

Thanks Tim Graham for the review and improved patch.