further fix to #55: less strict conditions to allow collapsing