fdo#75628: Write unit test for this.

Change-Id: I26e5d0bf4344eeb518222ba036c61eca861c5fcf
fdo#75628: SUM should inherit error if one is present in its references.

Change-Id: I94017fe91295dbb929f57be5e3fb26edf5032a8f