Apply patch from https://wso2.org/jira/browse/WSFPHP-460