Add test case for last node out of bounds

This test case fails on master, but should work fine once we merge bz/fix-index