Getting close, but realizing the colcounts approach won't work if we get a bunch of vertically-aligned gates. Need something stack-based again...