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.

My actual changes for this are in https://github.com/adam-vessey/islandora/commit/cb8c41936e6ddb7a16a445bb653126d81aef6655