Never thought I'd ever be going through coreutils source code to debug something in my own code...