This is a pet peeve of mine: `p ? true : false` is identical to just `p`.

This shoud be just `is_top_level: tlps.indexOf(dangler) > -1`.