attempted to centralized child node checking now that optgroup isn't always the parent element (can be a sibling), but it only works in the original project, not the filter plugin :(