Fix Graph ByParent() to generate list of child images per parent image.

It looks like these conditions were reversed in ByParent(), meaning that the table would only ever return one child image for any parent image.