Set $trace back to 0 since it should only be modified locally.