[edit] exclude Netbeans files
[fix] when prepending options, numeric keys are re-indexed

- includes test to reproduce the bug
- fix for the bug, keep the keys when inverting the array