Use the CAS server's document redirect parameter instead of the undocumented smart_path parameter that I'd invented myself.