Title says all. Current implementation assumes len(chain.output_keys) > 1 is a retrieval chain, but that is not always the case, since it can be any other type of chain (like a custom one which won't have the source key).
Or alternatively, the detection may be made more strict by checking the actual output keys