To the OP, just avoid taking that friend with you in the future. Too many trips with that friend might invite scrutiny along the lines of abusive hidden city ticketing.
Alternatively, after passing through security everyone tie each other off in the same fashion that climbers do to ensure that the third doesn't lose their way or wander off after just one segment.
Personally I generally find it to be more of a problem when a third wheel shows up and I only have two tickets. That can be more awkward than losing the the third en route.