Fixed stack overflow on malformed opam files (closes #696)