Travis CI: trying to make the build more "resilient".

Related to issue #11880.