Fixes #4971: Fixed hardcoded table names in `viaTable` expression in model generator