Harry Kane scored his 32nd league goal for Bayern Munich as he opened the scoring against Heidenheim.