Just after line 17 add in this line of code:
die("the entered captcha value was: " . $_POST["Contact_me_group_Security_code"] . " and the value it was compared to was: " . $_SESSION["captcha_Contact_me_group_Security_code"]);
This will only be triggered if there are validation errors. So if the captcha fails this message will let you know what the entered value was and the value it was comparing to. Please give this a try and let us know what you come up with.