Fixes #2766 -- incompatible line number API