Bmesh: Immediately encounter strange error after adding new layer and running bmesh op The script is simple:

import bpy, bmesh

mesh = bpy.context.edit_object.data
bm = bmesh.from_edit_mesh(mesh)
geom = [e for e in bm.verts[:] + bm.edges[:] + bm.faces[:] if e.select]

cut_layer = bm.edges.layers.int.new('cut')
ret = bmesh.ops.bisect_plane(bm, geom=geom , plane_co=(0,1,0), plane_no=(0, 1, 0))
bm.edges.layers.int.remove(cut_layer)

bmesh.update_edit_mesh(mesh)


I get the error:

TypeError: geom: 8 BMEdge has been removed


Here's an example blend file:

https://drive.google.com/open?id=0B9DFPZBPKp6ARjE5NXgzSTU0eDQ

Can anyone explain what's going wrong here?
I know the function itself looks a little pointless but that's because I've boiled the problem down to it's simplest form.
Why does the operation have a problem with the new edge layer I've added?
I can't find anything online about this...
Assign your int layer before you assign geometry.  PS took out verts from bisectable geometry.

import bpy, bmesh

mesh = bpy.context.edit_object.data
bm = bmesh.from_edit_mesh(mesh)
cut_layer = bm.edges.layers.int.new('cut')
geom = [e for e in bm.edges[:] + bm.faces[:] if e.select]

ret = bmesh.ops.bisect_plane(bm, geom=geom , plane_co=(0,1,0), plane_no=(1, 0, 0))
bm.edges.layers.int.remove(cut_layer)

bmesh.update_edit_mesh(mesh)