I believe checking if an entity has classname "func_water" on
pfn_spawn would be better. I am not sure if in this case it helps, but I had a plugin that removed bombsites/hostages with this method, because looping through each entity would be very slow.