(In [6098]) Refs #5138 -- Refactored implementation of contains in HttpRequest introduced in [6097] after a suggestion from Malcolm. Applied a similar refactor for MergeDict and Context which had comparable behavior.