Maybe you could try prefixing the command with 'legacy', but I think you might have better success with just replacing g:tagbar_type_{type} flavour variables with just a dict called g:tagbar_type and then 'type' could just be a key: g:tagbar_type[type], much like you have with defdict on that same line. I haven't looked at the actual source, so I can't speak to whether this will cause other problems, but this is something I've had success with in my own scripts.