Solves #457

Fixe a bug when index array would not be found when editing plugin file in subfolder.

cc @lukecarbis