Hey Michael,
About the only way to know if you've "stumbled upon" another melody (if you're not aware of it) is to play it for others and ask them if they've heard that melody.

Of course, one of the most (if not THE most) famous examples of this is when Paul McCartney dreamed the melody for "Yesterday" (working title "Scrambled Eggs") and played it for everyone because he wasn't sure it was original...it's a wonder some dirtbag didn't steal his melody after telling him, "Yeah, I think I've heard that melody, better not use it..." exclamation


“I usually start with a title or maybe a little rhyme or phrase.” - Harlan Howard

Co-writing = Compromise!