The reference count computation for shader operation outputs is wrong, because it considers internal links as references to the result, which is not the case. This patch fixes that by only consider external links.