discovery chooses common subtype rather than max toposort

Also, bools are less than strings, but not less than integers