function selfAndAllChildren(elements, allowDuplicates) {
  return selfAndChildren(elements, !allowDuplicates, -1);
}
Return self + ALL children for a number of elements

@param {Element[]} elements to query
@param {boolean} [allowDuplicates] to allow duplicates in the result set

@return {Element[]} the collected elements