This is a minor bugfix to account for the presence of shut wells (characterised by "ctrls[w]->current < 0"). The existing code would lead to indexing outside the "ctrls" array in the context of a shut well.