Update provider_util.c to correctly handle ENGINE references