Work-around for glob() randomly failing for no reason

Closes #1835