Support for reference parameters in spies.