Equations are evaluated at the time when they are needed.
However, you are right. The min() function should be improved to return the complex value. Thanks for pointing that out!
The problem with the schematic above is that xvalue() always corresponds to the first dependency, but you are trying to use the second dependency of S[1,1].