Thanks Firo.

When you say static entities you mean ones declared as globals in my code, or ones placed by WED inside the wmp file?

The ENTITY I was passing to my function was a map entity so that makes sense.