Bug 865147 - should nullcheck parent node of select.add 'before' argument, r=bz, f=Ms2ger, a=bbajaj