Issue/1475 illegal state tag fragment

Fix #1475 - note that the commitAllowingStateLoss() change shouldn't be necessary, but I added it anyway just to be safe.