Treat key=0 different from other falsy-looking values

Resolves #3859.