Why not just always do this?  This should work in all cases, so it seems like extra work to also maintain the visit()-based solution too.