This bug only occurs if the specified external X server does not exist.
I can confirm that this bug is still present on 4.0.2.0.
Also, for those who are affected by this issue, until it is fixed please, follow this workaround which Stephane Mutz mentioned but did not list: