Update informedby,derivedfrom query templates for qualified relationships

I've updated the informed_by and derived_from query templates to cover a few more cases that include the qualified relationships.