Filter out docs with missing fields, fixes #5173