Rick James. Cool.
Point of fact is that the module in which Jim was stuck, should not have had super tech in it exceeding 2269, unless it had a caretaker (Barclay?) who was periodically updating the enclosures Databse with general trivia and advances in technology.
If Barclay was Moriarty's caretaker, even after he left the Enterprise, then a facsimile of Voyager or a hypothetical asumption of Voyager before hard facts were available inside that program would have been a perfectly reasonable assumption.
Meanwhile... If the Doctors template was based on the (So called) Sentient Moriarty program, then it's possible that not only a version of Moriarty is existing inside the Doctor in some recess rat hole deep down, but the entire enclosures is existing in perpettuity inside every EMH.