(crypÂ·tomÂ·neÂ·sia) (kripÂ²tom-neÂ¢zh[schwa]) [crypto- + Gr. mnasthai to be mindful] the recall of memories not recognized as such but thought to be original creations.
According to Wikipedia:
Friedrich Nietzsche’s book Thus Spoke Zarathustra includes an almost word for word account of an incident also included in a book published about 1835, half a century before Nietzsche wrote. This is neither considered to be purposeful plagiarism nor pure coincidence. Nietzsche’s sister confirmed that he had indeed read the original account when he was 11-years-old.
There’s also, apparently, a 1916 German short story, written by Heinz von Eschwege, about a middle-aged man traveling abroad who becomes obsessed with a young pre-teen girl named Lolita. Vladimir Nabokov composed his Lolita in the 1950s, but lived for some time in the same section of Berlin as von Eschwege, and was likely familiar with his work.
So it does happen.