Fix bug in snap helper

Calling snap with no argument or an argument that matched
at the end of multiple alias names broke it dead.