Generic context-based unification.