Repository: godot
Issue: Command line export with Linux headless always re-imports PNG resources
Labels: bug,topic:editor,confirmed,topic:import

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:**
3.1
<!-- Specify commit hash if non-official. -->


**OS/device including version:**
linux_headless
<!-- Specify GPU model and drivers if graphics-related. -->


**Issue description:**
<!-- What happened, and what was expected. -->
When run with `--export` the headless version will re-import all resources, causing the export to take 20x longer than before.

```
~/bin/Godot_v3.1-stable_linux_headless.64 --export Linux/X11 Kinematic\ Character\ 3D.x86_64 
ERROR: instance: Class 'EditorSettings' can only be instantiated by editor.
   At: core/class_db.cpp:518.
ERROR: poll: /home/jpate/.config/godot/editor_settings-3.tres:3 - Parse Error: Can't create sub resource of type: EditorSettings
   At: scene/resources/resource_format_text.cpp:561.
ERROR: load: Condition ' err != OK ' is true. returned: RES()
   At: core/io/resource_loader.cpp:208.
ERROR: _load: Failed loading resource: /home/jpate/.config/godot/editor_settings-3.tres
   At: core/io/resource_loader.cpp:285.
WARNING: create: Could not open config file.
   At: editor/editor_settings.cpp:872.
reimport: begin: (Re)Importing Assets steps: 2
	reimport: step 0: purple_wood.png
	reimport: step 1: white_wood.png
savepack: begin: Packing steps: 102
	savepack: step 2: Storing File: res://cubelib.res
	savepack: step 14: Storing File: res://cubio.gdc
	savepack: step 27: Storing File: res://follow_camera.gdc
	savepack: step 39: Storing File: res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex
	savepack: step 39: Storing File: res://icon.png.import
	savepack: step 52: Storing File: res://level.scn
	savepack: step 64: Storing File: res://.import/purple_wood.png-ae65a206e7a59edf759728c3bad04e56.s3tc.stex
	savepack: step 64: Storing File: res://purple_wood.png.import
	savepack: step 77: Storing File: res://purplecube.scn
	savepack: step 89: Storing File: res://.import/white_wood.png-6895acd60ce97b4315494d2be377c357.s3tc.stex
	savepack: step 89: Storing File: res://white_wood.png.import
	savepack: step 102: Storing File: res://cubio.gd.remap
	savepack: step 102: Storing File: res://follow_camera.gd.remap
	savepack: step 102: Storing File: res://icon.png
	savepack: step 102: Storing File: res://project.binary
savepack: end
reimport: end
ERROR: ~List: Condition ' _first != __null ' is true.
   At: ./core/self_list.h:111.
ERROR: cleanup: There are still MemoryPool allocs in use at exit!
   At: core/pool_vector.cpp:70.
```
**Steps to reproduce:**
Download attached modified version of *kinematic_character* demo
extract
```
cd kinematic_character_export/kinematic_character
path/to/Godot_v3.1-stable_linux_headless.64 --export Linux/X11 Kinematic\ Character\ 3D.x86_64
```



**Minimal reproduction project:**
[kinematic_character_export.zip](https://github.com/godotengine/godot/files/3075038/kinematic_character_export.zip)
<!-- Recommended as it greatly speeds up debugging. Drag and drop a zip archive to upload it. -->