bugfix for create table t as select ...