Don't add the 'expanding' class when unecessary.