This seems to be a bug. Apparently, when you take a pointer of a constant the once_init
guard loses track of the initialization status.
Reduced reproduction:
Foo = begin
puts "Initializing Foo"
end
pointerof(Foo)
This prints “Initializing Foo” twice.