More robust expansion calculation.  Look Ma!  No operand!
Oops!  Don't forget nested script substitution!
Try this instead