Fix i is undefined error when editing vendors

When editing an existing vendor record that has an attached address, you
will get an error about i being undefined. It appears this could happen
with emails and phonenumbers as well.