Only discover instances when settings are shown

Otherwise slows down the server too much due to the blocking nature of the request