Patent law doesn't care about how you get to the same thing - independent invention does not work as a defense.
IANAL, I'm a random on HN, if you take this as legal advice I don't know what to tell you :D