(Bug 50155) Fix issue with category hierarchies on SQLite