BUG: Removes iteration over locals (no-no) in mathtext

Addresses issue #2925