rmatch_calls function

Recursively expand match calls in an expression from the bottom up.