Update getRelatedTerms to include ancestors, refs #4914
Remove unneeded code