Fixed #23889 -- Added more usage of quote_name_unless_alias() to avoid deprecation warnings.