error TS5037 occurs when there are import/export in .ts files

There are duplicate executions of tsc, one is with options and the other is not.
The latter causes an error TS5037 when compiling .ts files as module.
It seems that the duplicate has appeared in the commit 0c5c889405.