Python BMesh: index of new verts?
you'll have to reassign the vertices indexes using an built in function or using your own code as mentioned in the DOCs


  index_update()

Initialize the index values of this sequence.
This is the equivalent of looping over all elements and assigning the index values.



so your code should be :

bm = bmesh.from_edit_mesh(active_obj.data)
for i in range(20):
    vert = bm.verts.new((0.0, 0.0, 0.0))
    vert.index = len(bm.verts)
    print(vert.index)


or use 

bm.verts.index_update()