formula_installer: fix reqs default formulae.

(Commit message written by Mike McQuaid)

With the change in a0a93f1b3b7b2be9b8a319be91086ffe220f8e32
unfortunately requirements with default formulae no longer could be
resolved when the default formulae were not installed. This commit
fixes this problem.

Closes #31476.
Closes #31444.
Closes #30901.
Closes #31471.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>