Hey,
we have encountered an error with PDF.js. We were able to duplicate it and prepared little demonstration. In the attached PDF, there are two fields: "field1" labeled "Origin field" and "field2" labeled "Calculated field". "field2" takes value from "field1". Now to problem:

HOW TO REPLICATE:
Open PDF in PDF.js. In the field “field1” enter value, let’s say “24”. The fields are calculated. Save the PDF and close. Open it again. In the field “field1“ change the value to “48”. The fields are calculated. Now change it back to “24”. The fields won’t calculate.
Tested in Safari, Firefox, Chrome & Win10, MacOS.

EXPECTED BEHAVIOR:
Calculate every field no matter what was initial value.

[error.pdf](https://github.com/mozilla/pdf.js/files/10101473/error.pdf)

* Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import {
  AnnotationBorderStyleType,
  AnnotationType,
  assert,
  FeatureTest,
  LINE_FACTOR,
  shadow,
  unreachable,
  Util,
  warn,
} from "../shared/util.js";
import {
  AnnotationPrefix,
  DOMSVGFactory,
  getFilenameFromUrl,
  PDFDateString,
} from "./display_utils.js";
import { AnnotationStorage } from "./annotation_storage.js";
import { ColorConverters } from "../shared/scripting_utils.js";
import { XfaLayer } from "./xfa_layer.js";
const DEFAULT_TAB_INDEX = 1000;
const DEFAULT_FONT_SIZE = 9;
const GetElementsByNameSet = new WeakSet();
function getRectDims(rect) {