reference: Handle combination of tag and digest in AddReference Upstream-commit: 584e399d9632200e6c8a636339c8aa6347a57fca Component: engine