dbmanager: fix 'load as new layer' (fixes #9548)