I would be sooooo pissed about this, especially if I did nothing wrong at all.
I understand the teacher's point, but it is his problem that he used a test bank. Cut your losses and make sure it does not happen again. Do not punish the majority to get back at the minority 😡😡