Handle the case that `glob()` returns `false` (see #5226)