Use utils.merge_hash() instead of update for cache merging

Fixes #8968