Fix CI_DB_query_builder::_merge_cache() triggering E_WARNINGs

Kudos to kakysha for noting the bug & providing initial fix in PR #2698