If you truly were the inside boat in the three boat length circle at the leeward mark then you were required to be given room by the other boats. The starboard boat which came in from clear astern only had rights on boats which were outside or behind him before the three boat length circle. By that boat making you change course at the mark rounding he fouled you and every other boat that owed you room at the mark.
In a protest committee you would've been exonerated and probably could've gotten redress for avoiding the collision. The boat on starboard that barged in would've been thrown out for not exonerating themselves by doing a 720. This would of course only have occurred if someone on your boat or the surrounding boats had protested as per RRS or the SI's if they were different.
The overtaking boat should've taken the outside of the pinwheel, gotten clear air and left you behind. I see this situation a lot with catamaran sailors who think higher speed = more rights.