Edge Ring by python breaks things
Not sure if it's meant to be that way, but I found a fix.
By adding this to the operator, there is no more problem.

bl_options = {'UNDO'}


I suppose the ring function requires it somehow.