I bet you the LJBF came because of your uncertainty.
It was probably obvious to the girl, and an inconsistent frame is a major turnoff.. (If being inconsistent is a part of your frame, and done in a playful way, it can be cool, but don't change who you are, and how you are because of anyone else. that's showing a weak self-image. at least as far as I know, scream if anyone disagrees with that.)
By acting differently around your friends with her, you efficiently disqualified her worth over your friends. This would've made her, probably, feel that you somehow were ashamed of her, or something like it.
And that sucks, to her. hehe
My advice to anyone who find themselves in that situation is as you say, reinforce your frame...
Who is it you're living your life for ? Who is the one who is going to die when it's time for you to die ? (Hendrix, right there, hehe.)
Do you pick girls for social proof ? or do you pick the girl that you want for yourself ?
Trying to use a girl to up your own social value is weak. Social Value is something you create, and it's limitless.... you don't have to buy it from others. but this should become obvious as you gain experience.
And hey, man, shame it had to go down like that, but at least you gained the insight, the enlightenment you needed from the experience.
It's, ultimately, and primarily your life, and there's no one you have to get approval from for your actions and choices.

cheers.