coverity/13749: fix negative array index read in unset_global_local_option