Problem appears to be with 'tell' outputting to temp.ly too soon.
Looking for repeated invocations of make_notes_measure for last measure.
Closing in on the issue. M_N_M(13) is being generated repeatedly.
Seems to be backtracking due to failure during output phase. Need to discover source of failure.
Problem is clear: some notes are outside of LilyPond's octave range. Added rules enforce bounds on range for everything.
Previous commit fixes final outstanding issue, so removing some debug output.