This issue for the 14.7 is really similar to issue fixed in ENT-2303, therefore, ENT-2303 requires a backport.
Testing
See the reproduction at ENT-3687. Once CMS-14805, CMS-14806 and ENT-3708 have been done, the issue of ENT-3687 should not happen any more