Fixed #22293 -- Avoided renaming many-to-many tables to themselves.

Fixed this for both implementations of _alter_many_to_many, instead of
in `alter_db_table` itself (more implementations).