[Mantle bug squash] Corrected the test and moved the bug into the code itself.