`submission` has `related_submissions` which could be used here. I'm going to pull this in, but I just wanted to mention it so you could look at it later if you care to. This works fine, too.