Variants that throw on exhaustion.
Experimenting with including the line number.
Needed includes.
Include more explicit comment from original source.