RPO, Second-Order Contexts, and λ-Calculus