Added some rollback statements to try and get around an intermittent Session issue. Still unsure of the root cause unfortunately