Basically this patch adds the DEG_get_original_edit_btmesh and BKE_editmesh_looptris_get functions and changes the BKE_editmesh_tessface_calc to always calculate the looptris in the original editmesh.
The rest of the patch is for the replacement of the looptris direct access by the use of the new functions.
(It's been a while since I made this solution for the T56167, but since COW is still WIP, I decided to postpone it.)