Since I've run into this a few times now...
When push()ing something on the stack, we need to later pop() the correct type of value, otherwise we run into problems.
This s just an idea and I've disabled it if NDEBUG is defined. The current tests all still work though, which is good.
Each of these ALSO need to be 'if constexpr' I think.