codegen: Disconnect-at-constructor only if proxy found

Change-Id: I14e8e8ca00a99263227053a47129b93bcb27b7d1
Related: https://bugzilla.redhat.com/996021
Signed-off-by: Yedidyah Bar David <didi@redhat.com>
(cherry picked from commit c625968c014cbf00535c83fad2e960a9597615e3)