Make it possible to inspect a return value without returning it.

Fix mistakenly static method in optimized contract.