Fix possible invalid read when removing a temporary device

An invalid read may happens when doing the reverse service discovery but
for some reason the device disconnects with the temporary flag set which
will make the device to be removed without cancelling the service.
1 file changed