fix main function detection to rely on actually resolved types
Buildserver auto merge