Nahm's conjecture in the Cartan case