Bayern Munich extended their lead at the top of the Bundesliga to six points after beating Heidenheim 4-2 on Saturday.