fix bug adding autoinclude imports regardless of the flag
Merge pull request #926 from cos/fix-autoinclude

fix bug adding autoinclude import regardless of the flag