Text this: Decidable Classes of Tree Automata Mixing Local and Global Constraints Modulo Flat Theories