code: func (pe PathExpression) popOneLeg() (pathLeg, PathExpression) {
  	newPe := PathExpression{
  		legs:  pe.legs[1:],
  		flags: 0,
  	}
  	for _, leg := range newPe.legs {
  		if leg.typ == pathLegIndex && leg.arrayIndex == -1 {
  			newPe.flags |= pathExpressionContainsAsterisk
  		} else if leg.typ == pathLegKey && leg.dotKey == "*" {
  			newPe.flags |= pathExpressionContainsAsterisk
  		} else if leg.typ == pathLegDoubleAsterisk {
  			newPe.flags |= pathExpressionContainsDoubleAsterisk
  		}
  	}
  	return pe.legs[0], newPe
  }
docs: // popOneLeg returns a pathLeg, and a child PathExpression without that leg.