Use tryAutoloadInternal() to avoid duplicating code (thanks Vassil for the suggestion and the help)