Local vars should exist in partials for falsy `:object:` values too

c67005f221f102fe2caca231027d9b11cf630484 made the local var in partials
available only if what passed to `:object` was truthy.

For example this would not make the local variable `foo` available inside the
partial:

    render partial: 'foo', object: false

Fixes #17373.