Recuce calls to map::ter() a little more by stashing the value locally.