Callbacks: Restore and warn if some logging callback gets modified

Also fills the stack.js tests to verify the warnings