Fixed #23379 -- Corrected a referencing issue in sql_create.

Thanks to Trac alias flakfizer for the report.