Hoopl: improve postorder calculation