Fix NPE in certain situations when analysis is invoked on newly created
instance model file