FC Bayern closed out the league phase with a tough road win, thanks to a late goal from Harry Kane.