Borussia Dortmund inflicted a first Bundesliga defeat on Leipzig after coming from behind to win on Matchday 9.