Fixes NullPointerException during update. Fixes #1484
Merge pull request #1490 from sbt/wip/1484

Fixes NullPointerException during update. Fixes #1484