- subfile inverting now detects flatness and acts accordingly instead of naively applying invertnext to everything