Fixed the inferred table name of a HABTM auxiliar
table inside a schema.

Fixes #14824.