Fix ArrayIndexOutOfBoundsException when attempting to unlock non-existent locks after a rollback.