Although if I fly to the US mainland via Hawaii that doesn't mean I came from Hawaii. So there must be something else Spock used to determine the Doomsday machine came from outside the galaxy. Say like they'd never heard of it before, it had magical out of galaxy particles on it or it had a design he'd read about that say came from the Canis Major civilisations which is another galaxy both outside and inside our galaxy. Although these dwarf galaxies were apparently known from the 1950s, I have always been taught the Andromeda is our closest galaxy and I was at school umm later than the 1950s. Have these other closer galaxies always been known as galaxies? I'm guessing that during TOS and even TNG Andromeda was referred to as our closest galaxy. Not that Spock even said it came from the nearest galaxy.