Fix detecting last deployed tag.