Bugfix in tracing bookkeeping