Slight change to logic, merged in 7.x HEAD.

Needed to merge in 7.x so [Travis would run in my own repo](https://travis-ci.org/adam-vessey/islandora/builds/23612544) before making this pull request, because I'm silly like that.