Use quoted_table_name to allow relation chaining

Closes #4896
fix failing spec since we quote the table name now