If you include the same transaction in a block twice the block is rejected by ConnectInputs()... but that is only done after fetching transactions from disk, checking signatures, etc. And it doesn't trigger the DoS prevention code.
There should be a check for duplicate transactions in CheckBlock(), so blocks with duplicate transactions are rejected early and trigger the DoS code.