PR15100: look through type sugar when determining whether we have one of the
forms of 'main' which we accept as an extension.