Added a bounds check in the test harness.