Implement flatten\0 in terms of flatten\1

It's a small change but I was reviewing my implementation and having two almost identical copies of the same function side by side made me cringe. This feels better.