Cut p/c queries (has_child and has_parent queries) over to use global ordinals instead of being bytes values based.

Closes #5846