Do not toggle 'collapsed' state of clicked collapse element when target is still animating

Possible fix for issue #6691