Fix for
https://www.aeolusproject.org/redmine/issues/1510
This should work and shouldn't break any new tests, but I didn't test it on
providers that actually get affected by this as I don't have access to them.
Ian, please take a look at it and let me know if it solves the problem.