get_sha1_1: allow octopus^12 to be properly parsed.