Fix temporary_disconnect for non-trivially referenced arguments (by Alex)