I feel like I saw similar code elsewhere in this pull request.