Move back the application check as only the class presence check is not sufficient. Original commit: bbc73ec0e5
bbc73ec0e5