I occasionally get the recursion glitch too, mostly on Read|Unread when starting up -- I'm not sure if there's something wrong with those or whether they're just the first evaluated.
Here's the searches I use for my VLs -- I don't think there's any missing column keys and nothing references virtual_libraries() - I think the only composite referenced is #onkobo, which returns yes/no based on the value of an enumerated column.
Note:
readstatus() is a
custom template that returns values based on two columns (#percentread and #readinglist).
Currently Reading: template:"program:readstatus()#@#:t:~(currentlyrea ding|toberead)"
Read: template:"program:readstatus()#@#:t:=read"
Unread: template:"program:readstatus()#@#:t:=unread"
Fiction: #booktype:"=Fiction"
Fanfiction: #booktype:"=Fanfiction"
Nonfiction: #booktype:"=Nonfiction"
Comics: #booktype:"=Comics"
Documentation & Manuals: #booktype:"=Documentations & Manuals"
Magazines & Periodicals: #booktype:"=Magazines & Periodicals"
Series: series:true AND NOT #booktype:"~(fanfiction|documentation|magazines)"
Loans: search:"=Is library book"
(saved search:
(formats:#=1) AND (formats:overdrive))
eBooks: search:"=Has eBook" AND NOT #booktype:"~(fanfiction|documentation)"
(saved search:
NOT formats:"~(overdrive|paperbook)"
OR NOT formats:#=1)
Physical Books: formats:paperbook
On Device: search:"=On Device"
(saved search:
ondevice:true OR #onkobo:true)
Cleanup:tags:"=[Cleanup]"