Added support for numeric indexes in key/val flag handling