Add support for nested collections when using collapse