Changes State#getOriginalObject to be more accurate after changing type.
Improves the various triggers to be able to run type-specific modifications even after type changes in the middle of the triggers.