Could we just remove this chain of includes? We are finding the root of the application, so we should know for sure where is the main include ($APP_ROOT/include). This brute force approach of including several levels backwards make no sense after your improvement, right?