Group riding etiquette
There are a number of problems in your situation, including the behaviour of the groups, which I will breakdown as the following:


A group of 50 is excessively large and it sounds like they also did a poor job of passing.  This is one of the primary problems of large groups, they are hard to move in unison and the club/organizer should have broken the group into smaller more manageable groupings.
When a group is passing another slower road users, such as the OP, the group should have given the OP a very wide berth to:


keep the OP safe as they were not involved in the group;
make it clear that the group is separate; and
make it difficult for the OP to inadvertently get mixed into the group.

The OP needed to decide whether or not they were part of this group, and if not, make it clear and in both actions and vocally, to the group, that they needed space. Speeding up made it more difficult for the group to pass, which prolonged the interaction and increased the probability of a future routing conflict. [This one may generate a some controversy, but I explain further below.]


Personally, I believe by far the biggest issue was with how the group was behaving, they can't expect some random person on a bike to be versed in group riding, and they forget that they are sharing road with other road users.  That said, as someone with a large number of years experience in group riding, I would have attempted to removed myself from that situation ahead of time by asking riders in the group to let me through so I could go straight or asked for guidance.  Expecting someone who is being overtaken to just pull over and stop is arrogant to say the least.

Most people in that situation wouldn't have had that experience or necessarily known what to do;  however, there is still an element of personal responsibility as the OP allowed themselves to integrate into the group (likely because it made riding easier), without known what was really expected.  


  "By virtue of the magic of drafting, by the time about ten riders were past me, I had no problem at all keeping pace"


It is clear that the OP was knowingly benefiting from some type of draft, which ultimately made it more difficult for the group to pass and prolonged the OP's exposure to the group. The OP made the decision to speed up, they could have easily kept their original speed (e.g., brakes) which would have allowed the group to pass quicker.  You can't get a free draft (or partial draft) allow yourself to be somewhat integrated into the group, then suddenly do what you want. Groups don't react well to sudden changes. That said, this is a relatively small transgression as most people suddenly finding themselves in this situation won't be thinking of these nuances. Rather, the onus is really on the large group doing the passing to make this work safely.