fix for reassignment with bad index ref + test

this also removes duplicate case blocks from reassignment submission

http://manage.dimagi.com/default.asp?82824
Merge pull request #1804 from dimagi/bihar-assignment

fix for reassignment with bad index ref + test