Moving this check here gives a potential performance benefit - instead of being called each time the admin toolbar is shown, it is now only included when the transient needs refreshing.