Add hack to avoid endless recursion.

Some databases contain cyclic dependencies that cause solver to be
broken completely. This hack provides a sort of `reasonable` behaviour
to break such cyclic deps. It is not ideal, but it should be able to
resolve that issues.
Set to b4.