Fixed a bug in StartupApplicationCommand that would repeadedly call
finalize() in case several preloaded resources refer to other resources
that have (not yet) been defined.