in reply to Are "$hash{$_} ||= 1 + keys %hash" and variants well defined or not?

Your results do not surprise me. I personally think of these two as equivalent:
$hash{foo} ||= keys %hash;
for($hash{foo}) { $_ ||= keys %hash; }
At least, the results agree: the hash element exists (hence, it is counted in keys), before the assignment is called. My rule of thumb is: if you use a hash element as a R/W L-value, then it'll autovivify. It'll even autovivify in the for loop, if the loop body is empty:
for($hash{foo}) { } # results in { 'foo' => undef }

I was surprised to see an exception when using a hash element as a sub parameter:

sub blackbox { ... } blackbox($hash{foo});
may or may not autovivify $hash{foo}, depending on what blackbox() does. For example:
sub blackbox { } # no autovivify
sub blackbox { $_[0] = 123 } # results in { 'foo' => 123 }

Tested with perl 5.8.7