And valid_lisp_object_p returns zero for stack-based Lisp objects,
because (AFAIU) it wasn't meant to be used with such objects.
I can reproduce this both on MS-Windows and on GNU/Linux.
In GNU Emacs 28.0.50 (build 563, i686-pc-mingw32)
of 2020-09-14 built on HOME-C4E4A596F7
Repository revision: 15d2f6af000625640b3c47d2aeec3114ac1ac544
Repository branch: master
Windowing system distributor 'Microsoft Corp.', version 5.1.2600
System Description: Microsoft Windows XP Service Pack 3 (v18.104.22.16800)
value of $LANG: ENU
Major mode: Lisp Interaction
Minor modes in effect: