Clear DOM node ID cache when files are removed

Fix #6480

cc @RaymondLim