Fix broken submission validations

We have to make sure the submission's code has a valid syntax before
passing it to skeptic. Apparently we can't rely on the order in which
validations are executed so we need to keep the two checks in one
method.