fixing stupid submitted-mistake and adding a simple control flow, both in document_match.go