Fix preview getting out-of-sync with filename/targets in some cases where preview takes long to load or is problematic (missing plugin, no permission to run plugin, etc.)