Allow ResultVariable to expose resultCodes from all the merged results.

Change-Id: I9c107d711cd2f23b434f9041c1bdbad20de9565d