I think this should also be `flowMap.synchronized { flowMap.get(fd) }` since the map isn't thread-safe at all and needs to be properly synchronized for all get/modify operations.