Fixed issue #9311: Error on DB upgrade