The WHERE clause only applies to
fof, so while it will hold true for any
fof node, it will not necessarily apply to nodes earlier in the path.
For example, if there is an
fof node that is 5 hops away from Tom Hanks where
fof doesn't know Tom, any of the previous hops on that path may be to people who do know Tom. If you had a requirement where all nodes in the path (or even a segment of that path) had to also not know Tom Hanks, then you'd need to explicitly add that to your query, such as with something like this:
WHERE none(node in nodes(path)[2..5] WHERE (t)-[:KNOWS]-(node))
It's entirely possible for Tom Hanks to appear multiple times in the path, but we know for certain that they can't be the second or third node in the path (unless Tom :KNOWS himself or there are multiple :KNOWS relationships between Tom and a person).
The restriction in Cypher pattern matching is that for a single MATCH, a relationship can only be traversed once per path (so we can't traverse a :KNOWS relationship from Tom and then reuse the same relationship to get back to Tom, for example).
If you need stronger restrictions, such as never revisiting a node per path, then you'll need a different approach, either specifying this in a more complex predicate, or using something like APOC path expander procedures, which can allow you to specify the uniqueness constraints used during expansion.