Word splitting taking place
Your code relies on word splitting suggestions=( $(compgen ... ) ) and the completion gives me wrong results before you set IFS=$'\n'. When you tested your function, you might have had IFS set from some previous attempts (since compgen also splits using IFS, I believe that really is the case). It's also subject to pathname expansion which is not that important here but still might be an issue in some extreme cases. set -f might be a good idea.
I believe that creating a completion that correctly handles whitespace characters and globs is extremely painful. I may have missed something of course and I might embarrass myself :) Overall it's a great article giving insight in some less known parts of bash :+1:

@pesathem Hi there and sorry for the late response!
I will check what you reported and I will get back to you asap. Thank you very much for your feedback!