Fix various bugs in handling of orderedColnames in iql.js