Fix temporary variable handling when using methods defined in VAPI files