Add test showing that bug affects criteria api.