It looks like this bug still exists, and it’s surprising how quiet this thread has been. Is it being discussed somewhere else?
Thanks for the workaround,
@Steffen. Although it removes all cell customizations, it does the job. Better to lose customization instead of garbage entries.
Perhaps the following could be an alternative to using preg_match? (Also, I think only td is affected, but it should be fine to include tr as well.)
PHP:
if (in_array($tag->tagName(), ['td', 'tr']))