unexpand: fix incorrect expansion, add test for it

function                                             old     new   delta
expand_main                                          676     656     -20

2 files changed