Fix regression in 89b8966 expecting global rivets reference

89b8966 regressed the fix for #146 in 365e32e.