server.py: fix DB query causing duplicate local transports