I would think that if the study set out to test hypothesis Y, but their data actually suggests hypothesis X, then that's pretty convincing evidence for hypothesis X since we know that it wasn't a result of publication bias/researcher degrees of freedom. (Then again, I suppose hypothesis X might've been found in a fishing expedition...)