Fix cache_key clobbering bug