stagger: added a hook to override the internal visibility function.
stagger: small optimization.