Yes this is exactly how NAV splits lines, it always puts the new record between the 2 records you are splitting, and if you split enough times it will run out of numbers, that is not a bug, it just how it works,
The reason for this is you may add a line between the 2 (Below the 15 000 line was added between the 2) you now have the opportunity to add another record between the 10 000 and the 15 000 (So 12 500), if you had made the new record 10 001 you could no longer split between the 10 000 and the 10 001
10 000
(12 500)
15 000
(17 500)
20 000
If you are running out of numbers (And it looks like you are adding the records with code) why don't you just specify the line number as the first +1 then you will have the full 9 999 lines to work with? this functionality was made for users manually adding lines, for coders you should add your own line numbers