Flap altitude limitation is normally due to local airflow becoming supersonic.
Classic example was a Trident one in the clacton hold at around fl250 when the second officer extended the droop - the aircraft lost somewhere around 5000 ft before they recovered! (captain in the loo)
Grey matter says the limit was 22000ft?