Ensure that a valid document line index is used.

If no CodeDom header is present then a value of 0 will be used which is
invalid.