Do not crash on some more subtle exceptions upon query