Fixed removal of children container upon collapsing not working on Firefox