Extract tracing from `validate`.

Remove tracing from the `validate` function. Call the `tracer` function
directly when it is needed.

Closes #261.