Only enable the safe mode if there are third-party modules (see #6514)