Fix a crash exporting to WOFF.

This addresses the crash and several hangs from #1642, but it does not address the source of the negative ligature indices.