Confining analysis solely to cases where there is a noun group following the verb (though, as seen here, that-clauses are considered to realise direct objects by some) I've seen treatments that class all N2s in N1-V-N2 constructions as direct objects, even crazy examples such as It weighs a ton; He laughed his head off. I've also seen treatments regarding all forms resembling ditransitives as true ditransitive constructions (She led them a merry dance).
Allerton, in The Handbook of English Linguistics_eds Aarts and McMahon claims that post-verb noun groups such as appear in
The piano resembled a pianola.
The piano weighed a ton.
The piano had a stool.
The piano seemed an antique.
should not be considered objects but are 'best regarded as belonging to a slightly different category'.
Peter de Swart argues against a clear-cut division between transitivity and intransitivity.
In this publication, he goes on to discuss transitivity as a gradience phenomenon, citing Hopper and Thompson. He says that semantics / the concepts of the subject-matter, and syntax, are inextricably linked, in English as in other languages. The only real conclusion I've been able to extract is that if one tries to use the simplistic analytical model I was taught as 'fact' at school, one is going to encounter severe problems trying to explain some common English usages.
Matthias Meyer further argues:
Around 2006 I started thinking about developing a new model of English
verb complementation. The reason for this was a growing
dissatisfaction with current non-transformational models such as those
presented in the Comprehensive grammar of the English language (Quirk
et al. 1995) or the Cambridge grammar of the English language
(Huddleston & Pullum 2005). It seemed counter-intuitive to me, for
instance, to class predicates such as lack courage, weigh 15 kilos,
resemble one's aunt, have a sense of humour and other non-passivisable
structures as being transitive and as involving an object. I found it
improper to lump them together with classic transitive structures such
as write a story, shoot the enemy, buy some sugar – whose complements
are easily passivisable.
What I deduce overall is that various grammarians consider the simple S-V-DO and S-V-IO-DO models inadequate to explain all such cases. Barrie classes '[John wrote] me' as S-V-IO, which isn't traditionally standard, but makes sense. Though I've seen this construction analysed as using a 'syntactic DO' (not a 'semantic DO'). OP uses a S-V-DO-IO ordering for "[John gave] it me".
Also, categories other than DOs and IOs are said to exist / be needed [perhaps with 'tell'?].