The method can sometimes not cleanup properly during an early exit after modifying the uncommitted keys map.