Fix indexing to index "" values

This redoes a bunch of janky code to be more correct and work with l10n.