Invalidate the model after changing the input.

* changed addElement() to add_element()
* 2 tests added to test invalidating results from a previous run after
calling set_value() again