Original design of the document-storage was supposed to store the embedded resources in memory, while the document is loaded and unload them from the memory, as soon as the document is unloaded. But after July's embed-all refactoring its meaning has changed. Instead it is used to store the resources that should be embedded into the document separately.
Therefore, now this storage of the resources must not include the resources that are embedded via other means, e.g. asl layer styles or asl/psd patterns.
Right now, the only place where this storage is really used for embedding stuff is KisPaletteEditor.
If we want to recover the idea of "a memory-only storage that unloads the resources on document unloading", we need to make a separate storage for such temorary data.
The commit doesn't fix the bug linked, but it removes warnings about trying to save non-serializable resources into a persistent storage.