Further support for diag line_num < 1

Fixes #1028