fix segment prototypes cache invalidation