Bugfix: raise KeyError when record does not exist.