Fix composer autocompletion for TB 31.

It's a bit of an obscure change, but seems to do the trick for me. Details in the commit message.