Fix for SQL error in getRootItemIDForList()