Fixes #5780: `QueryBuilder::batchInsert()` may cause "undefined index" error