(DO NOT MERGE) Fix #582

Still testing, do not merge.

Fix #582

see https://github.com/travis-ci/travis-core/issues/187