improved detection if gemset is missing, update #2664