$ 0 0 *MERGE* Merge trunk fixes into the empty-table-optimizations branch. (tags: empty-table-optimizations)