Maintaining state of collapsible directives on refresh