Fix broken project filter for tasks, fix invalid SQL in IS_ONE_OF