backport (dpvc): Gateway debug: correct code allowing multiple problems to be drawn from the same problem group. I think this is correct now (the original code I wrote was odd enough that it's not at all clear what I was thinking...).
Changed paths: