The library dependency finder does't do what it says on the tin

I would like to create and use a library in my PIO project. I’ve followed the structure laid out specifically in the lib/readme.txt file.

However, when I add

#include <Foo.h>
#include <Bar.h>

to main.c as specified, I get

cannot open source file “Bar.h”
cannot open source file “Foo.h”

Could you provide a simple project to reproduce this issue?