disable incorrect optimisation for set.discard()
add some more typing in FlowControl.py