I had a similar problem in the same place. I thought it was the same error at first, and I changed the condition on line 89 to "vrn.results and #vrn.results == 1" to prevent it, but then I noticed that it wasn't the same error at all. It was actually in the next line, saying "attempt to index field '?' (a nil value)".
By separating the nested accesses on line 90 into named variable assignments, I was able to tell that it was the attempt to access ".name" on "vrn.results[0]" that caused it. Apparently, even if vrn.results exists and has a length of 1, vrn.results[0] can still be nil. I know next to nothing about Lua, but I presume that the lone table element may be stored under any index, not just '0'.
For now I just commented out line 89 and 90 and let the code default to the "placeholder" icon.