When checking for matches, a phrase can match the content, the filename,
or both.
Currently, it is not possible to only match the content, but not the
filename, thus the filename matches are not checked.
This is a preparatory change, no functional changes
Depends on D28925