[flang] Fixed crash on forward referenced len parameter
Using a forward reference to define a len parameter causes a crash.
The underlying cause was that a previously declared type had an
erroneous expression for its LEN param value. When this expression
was referenced to evaluate a subsequent expression, bad things happened.
I fixed this by putting in code to detect this case.
Reviewers: tskeith, klausler, DavidTruby
Differential Revision: https://reviews.llvm.org/D80593