There's no evidence here of any bug at all. Maybe you could repost
with the behavior you expect and what happens when you run the script.
When you run the script, make sure you do so in an empty directory.
`?' is a special character to the globbing code, and the results
of parameter expansion, unless quoted, are eligible for globbing.
Chet