result: add flags merging helper

Rather than open coding the merge helper, add it to the result object.

Signed-off-by: Jeff Mahoney <jeffm@jeffreymahoney.com>