Fixed a bug in adding planning rule effect indexes.