Ok a little bit more - the GPC['do'] is not being set if there is a form posted at the same time.
So narrows it down to :
PHP Code:
$vbulletin->input->clean_array_gpc('r', array(
'do' => TYPE_STR,
'c' => TYPE_UINT,
'id' => TYPE_UINT,
'cur' => TYPE_UINT,
));
$do = $vbulletin->GPC['do'];
?
($do is blank at that point)