fix bug adding autoinclude imports regardless of the flag