Only change the collapse/expand state on the first child.

There are possibly children nested below that.

See #1281.