Silenced error message when license fails to load

Also includes some refactoring that will be cherry-picked into master.