Fix NPE in core when library is missing

Core would NPE if a stage was added with it's library file missing.