simplify flatten test to avoid 'unresponsive script' issue in old IE testing