How to fix outdated internal index table in an addon
This was added to speed up scripts. The Blender 2.73 release notes mention it and reference the commit that introduced it (in the Python API section)

A backwards compatible solution is the following addition before any code that accesses bm.verts / bm.edges / bm.faces indices explicitly. For clarity, that means if an addon has any code like this:

bm.verts[i]
bm.edges[i]
bm.faces[i]


Then preceding it must be a call to ensure_lookup_table. Often you'll only need to do one such call, and you'll want to stick it outside of any tight loops if possible. 

if hasattr(bm.verts, "ensure_lookup_table"): 
    bm.verts.ensure_lookup_table()
    # only if you need to:
    # bm.edges.ensure_lookup_table()   
    # bm.faces.ensure_lookup_table()


If you add new verts / edges / faces to the bm, and then subsequently do an indexed lookup you might find that you need to call ensure_lookup_table again.