Fix trace depth reporting

This fixes #262.