Fixes https://code.google.com/p/simplesamlphp/issues/detail?id=622