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