AETemplate auto connect bump

I have created a custom mental ray shader with an normalCamera attribute and I'm now trying to
implement the AETemplate for that attribute. I've had a look at the default maya and mental ray AETemplates
for all shaders that use bumpmaps and I've copied in the custom call that they use. Here is a snippet of my AETemplate that contains the line that declares the attribute as well as the procedures that gets called:

editorTemplate -callCustom "ilBumpNew" "ilBumpReplace" "normalCamera";

global proc ilBumpNew (string $attrName)
{
    setUITemplate -pst attributeEditorTemplate;
    attrNavigationControlGrp -label "BumpMapping" -at $attrName ilBumpControl;
    setUITemplate -ppt;
}

global proc ilBumpReplace (string $attrName)
{
    attrNavigationControlGrp -edit -at $attrName ilBumpControl;
}

The code adds the correct look to the "bump mapping" controller and I get the texture selection window when clicking it, but when it comes time to actually connecting the texture to the normalCamera attribute it just ignores to add a bump2d/3d node
and directly connects "outValue" of the texture to "normalCamera".

It seems that I've missed some sort of vital procedure that actually tells maya to auto connect a bump node if I'm trying to connect a texture to the normalCamera attribute.