Flying a flag upsidedown is not a signal of distress
Many flags are the same upside down, the UK, Japan for example other flags are the reverse of other countries - Italy and Ireland for example.
However if you tie a knot in the flag and then fly it upside down it is a signal of distress.