Fix updating view after programmatic changes from commit d49b5e42903103ce0ef5cdb20b7b147989db1d8e and pull request #221 that hasn't been merged in 3 months.