Update `OnWebApplicationCondition` to be an `AutoConfigurationImportFilter` and filter out classes early. Closes gh-13328