Ported check_loop from oldvisit to <V:Visit> trait API.