Indirect transitions in two-nucleon transfer reactions between heavy ions