Update DeplDetails during rebuild
Update DeplDetails during rebuild

After the rebuild all check instances are completely new, so go
ahead and process the deployment details right there.

Then explicitly close the DB connection so it is not closed via
defer() while the function has already returned and we start
reloading the tree again.

1and1/soma