[BZ-1051493] avoid to try to build a KieBase if it declares an invalid include
(cherry picked from commit d13681985dcadbe79dbc89cf8e59b1f3c9ebcb24)