The Reference Desk/How was River Song in The Pandorica Opens and The Big Bang?

From Tardis Wiki, the free Doctor Who reference

If she is the daughter of Amy and Rory, and Rory had never existed, and Amy and Rory had never married, then River shouldn't have existed. How then did she exist even at the beginning, even if it was explained how everyone existed towards the end.