Port to trunk, fix typeclass inference for sexpr.