The problem really is the combination of dyanmic insert/update and batch. That is currently broken. You should be able to remove one or the other as a workaround. I took your tests and verified that to be true.