Fix page numbering in the users guide PDF; fixes #7793

The external core chapter had an abstract, which seems to reset the
page count to 0.
Check to see if TVar's are locked in check_read_only (fixes #7815)