BTreeMap: modification listener could be called with wrong key. See #297