Better HMap type preservation through merge