I finally found it. I forgot to check the function names. It's a function of bash-completion, though I don't think that such a function name should be exported.
--- Begin Message ---Not sure we have enough info here. Have you tried "set -x" to see what's really going on? Have you also confirmed that it isn't actually calling your script and the script simply isn't functioning as expected? -- Dan Douglas
--- End Message ---