Just to clarify, is the code being skipped for just some machines or all of them. Your code should run the relevant section for all machines except TWEETY and MARVIN.

You might also have the script print the value of $Result, just so you know what it's being evaluated to. If all else fails you might try using the long path names instead of the short ones. I have had a few instances of odd behaviour with this kind of thing, although admittedly not with Kixtart.