Allow a function to be passed to 'context'

Also, dump resolved context object when in verbose mode.