Fixed bug of inaccurate entry index values when folders were in the list but option was set to not show folders

When folders were in the list but option was set to not show folders the index values would be wrong. Messed up #-19 shortcuts.
Used a stateless way to detect and set the index value of an entry that isn't limited by variable scoping and without using a global variable to persist through function calls to addSpeedDialEntry().