Fix for #196 Enum issue where an Enum is the last block in a file causin...

...g an error

Now checks to see if the Enum block is the last code block in a file, to avoid it trying to access a non existent code block.