I guess because of drupal_goto call, when using callbacks for secondary languages, language is appearing twice in the url generated for redirection, causing page not found error.

For example, my site's main language is Catalan, secondary language Spanish, when accessing

http://www.foo.cat/es/myCallback/?a=1111

redirection is to

http://www.foo.cat/es/es/myCallback/