Revert "try catching main declaration earlier"

This reverts commit 392950bf05a6316be0c506de964941a21c5764aa.