Handle static variables in a consistent way for the artifact cache.