This has an easy workaround: add lex_sort to the definition of @vertKeys.
I take it this happens because even though the seed for the problem remains constant, the action of the keys function depends on other random factors that can't be controlled. But this behavior is counterintuitive; maybe the workaround should be incorpated into the WW base to produce a PGkeys command?
DOCUMENT();
loadMacros("PGstandard.pl",
"PGML.pl",
);
TEXT(&beginproblem);
%vertices = (
I => [10,30], J => [20,30], K => [30,30], L => [40,30],
E => [10,20], F => [20,20], G => [30,20], H => [40,20],
A => [10,10], B => [20,10], C => [30,10], D => [40,10] );
@vertKeys = keys( %vertices );
BEGIN_PGML
[@ join( ",", @vertKeys ) @]
END_PGML
ENDDOCUMENT();