[Bug] The `upsert` should only look at the `rule.outputs` values
The upsert of building values should only look at the outputs defined by all rules, but it now tries to upsert all the values (including parts of the input). This is wrong and should be changed