facebook/react — pull request #1242 by syranide (2014-03-10 23:34:02+00:00)
Title: Unbreak JSX comment comma fix

https://github.com/facebook/react/pull/1219

Oh wow, how did I miss that, I even had a file with all test-cases, must've forgotten to save or something. Anyway, apparently my first solution was indeed the correct one. I've recoded it and as far as I can see, this does fix all cases.