improved global_limit-related code so that limits are not reached due to permanently failed subs
improved global_limit-related code so that limits are not reached due to permanently failed subs

wtsi-hgi/vr-pipe,wtsi-hgi/vr-pipe