Purge the internal cache when disabling the Contao safe mode (see #5579)