The length of the cage has nothing to do with the compatibility for indexing (a given derailleur model is frequently offered with multiple cage lengths and they work ok with the same shifters). But it sounds like the long-cage derailleur you currently have was probably not designed to index at all and may well have slightly different cable-pull requirements than the 'Shimano SIS' derailleur you have on the folder.