Fix a bug where the last access of a trace could be dropped.