Mac nl only takes lines 2048 chars long
From man nl:


BUGS
     Input lines are limited to LINE_MAX (2048) bytes in length.



To fix, you can either patch the source yourself (might need some work) or get the source for the Linux version (which is probably available on any GNU server).