Move portDB attrs to loop() local vars.

When acquirePorts fails it unwinds partially applied state.  The preceding check only verifies that the operation failed. It does not verify that the intermediate results were correctly reverted.