LPS-34648 Prevent NPE when upgrading inconsistent databases
LPS-34648 SF