Set IN_FORM_CONTEXT_VAR as part of extra_context.

Fixes #73.
Added test case.
Merge remote-tracking branch 'melinath/patch-1' into melinath-patch-1