Added error messages.
Option link indices now skip blank options correctly.

Previously, a blank option followed by a non-blank option would save
the link index of the non-blank option to “1”, but it now skips the
blank option and saves the link index as “0”. This means that if there
are X options, they will occupy link indices “0” through “X”.