Fix #6 - Fix off-by-one errors when rendering bends.

This led to undefined behaviour when a bend and hold stretched into the
next bar and also occurred at the last position of the system.