Fix for use table name template within generating "viaTable" expression.

Fix for use table name template within generating "viaTable" expressions.
Should use mb_substr