Or you could change the function so that it interprets `GLOB`/`GLOB_RECURSE`/`FILES` relative to `DIRBASE`. Then no check will be required.