Made not found logic easier.
Relates #3172