(#23131) Remove special casing of Class 'main'