Bug in the Miller-Rabin Test in BigInt.js 5.4

While experimenting with the Miller-Rabin primality test
I have found a bug in the test implementation in the arbitrary-precision arithmetic library
BigInt.js
(in particular, the functions millerRabin and millerRabinInt).
Leemon Baird, the author of BigInt.js, has been informed and will likely post a fix soon.

Bases 2, 3, 5, 7, 11 are liars; they are not expected to reveal compositeness in these cases.
The witness bases 17, 19... listed in the left column do reveal compositeness in unaffected implementations.
These same witness bases (or any other base tried!) do not reveal compositeness in BigInt 5.4.

In all of the above test cases, the bug no longer occurs after the following suggested fix in BigInt 5.4: