Load database at correct time in import order

Signed-off-by: Jonas Kalderstam <jonas@kalderstam.se>