Fix for https://issues.apache.org/jira/browse/FLEX-34556 (thanks to Jorn Nolles)