put sub-tp/bot last, so that recursive defs type check in queries