Yes, this is the syndrome which NARTH seeks to cure. Of course, gay advocacy will have none of it.
I’d agree as making logical sense, that the person is alienated from his normal self identity by the unpleasantness of what he experienced — perhaps tagging false shame onto what ought to be a real self identity. I was simply positing an additional animating principle in the mix, serving as a kind of false hero or hijacker to what you point out as being a weakly (if at all) defended personality. It would pretend to be a friend, but it’s an enemy, a prankster — in theological terms, a devil. A very tricky and cruel devil. And the person probably hasn’t the foggiest clue why he is so devoted to it; it defies his reason even if he is a genius. (They say the last thing a fish notices is water.)
I’d expect this sort of thing also to crop up in dysfunctional families where the parents, perhaps in spite of themselves, carry on cruelly and the child is so sensitive that he is easily hurt by that.