Put Command properties in the filter functions' scopes.

This allows real functions to be used instead of unsafe construction of
function objects from strings.

Change-Id: Ic1b31d0f7984caaac0cf9a5b5a21d085736015b3
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>