Capture all related entries in two queries

Related to issue #30