QueryBase now throws and exception if it has no root.