Call checkX2goAgent much earlier (in ddxProcessArgument) and adapt NXAGENTWINDOWNAMELENGTH to its result.