Fix incorrect variable name in numChildren

numChildren got variable $onlyVisible as it's param, but checked for $onlyViewable, resulting in PHP notice and broken functionality when called with any other value evaluating to true.