There is a word for the idea you were certain was yours.
Cryptomnesia. The experience of believing something is original — a thought, an image, a melody, a phrase — when in fact it is a memory. Not a memory you recognize as a memory. A memory that lost its label somewhere in the archive and resurfaced as something new.
The content survived. The source did not.
You didn't plagiarize. You didn't steal. You genuinely believed the thing was yours because, by the time it arrived, it felt like yours....