In influence_models.py line 115, the code is:
tmp_used = used[:i] + used[i:]
This line doesn't remove the ith element in used, maybe what you really want is sth like:
tmp_used = used[:i] + used[i+1:]
and also need to check whether i+1 is out of range.
For now, because 'tmp_used' is the same as 'used', backward pass actually did nothing.