Whether or not InsetListings should be collapsible is open to discussion.
My reasons for using InsetCollapsable are that program listings 1. can be long (maybe over several pages) so CLOSE mode can be usable. 2. can be short or inlined (lstinline) so INLINE mode can be usable. 3. can float. (Another reason why the layout solution does not work). Bo