@Override
    public void endStream() {
        try {
            super.endStream();
        } finally {
            depth = 0;
        }
    }
This method tells filters that a stream is about to be parsed so that
they can complete any setup necessary.
stroom-pipeline/src/main/java/stroom/pipeline/filter/IdEnrichmentFilter.java