Make the port allocator yet another time more robust