Fix some coercion problems with new SecureRandom logic.