Bayern were beaten 2-1 at home by Frankfurt, their first league defeat at the Allianz Arena for 30 games.