Cannot find header file from library class

My sketch (foo) includes a class (bar) which is in the libraries folder. Foo and Bar both include FooBar.h which is located in the same directory as Foo. Unfortunately, this doesn't always work. What happens when I compile is:

Bar.h: : fatal error: FooBar.h: No such file or directory
#include "FooBar.h"
compilation terminated

An Error was encountered during the "Deep Search" library discovery process.

Here is the code:
// Foo.ino
#include <Bar.h>
#include "FooBar.h"
Bar *bar;
void setup() {
Serial.begin(115200);
bar = new Bar();
bar->init();
}

void loop() {}
<<<<<<<<<<<<<<<>>>>>>>>>>>>>>
// Bar.h
#ifndef _BAR_h
#define _BAR_h
#include "arduino.h"
#include "FooBar.h"
class Bar
{
public:
Bar();
void init();
};
#endif

<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>
// Bar.cpp
#include <Bar.h>
Bar::Bar() {}
void Bar::init()
{
Serial.print("Bar class initialized");
}
<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>
// FooBar.h
#ifndef _FOOBAR_h
#define _FOOBAR_h
#include "arduino.h"
#define FOOBAR true
#endif

My goal is to have multiple instances of Foo, each of which has a different version of FooBar, with all instances using a version of Bar which is compiled with different options that are selected using "define" statements in FooBar. To accomplish this, Bar must be able to include a version of FooBar from the same folder that contains Foo.ino.

Ideas?

The only way you can include a file in the sketch folder from a library installed in the libraries folder is to provide the absolute path to that file in the #include directive in Bar.h.

When possible you should just provide standard function API interface to the library. There are times when you just really need to use the preprocessor. In that case the best (though far from ideal) solution I've found is to put all code dependent on FOOBAR macro Bar.h. Then you only need to #include FooBar.h in the sketch before you #include Bar.h.