Add a bit more logging in suspicious places (bug 920022)