made add_bdag_headword re-entrant again