Add missing 'if rng:' guard.
(#352)