Calculating has_return_value on the fly.