Add test for dynamic scoped lookup/binding.
Fix bug that could lead to lack of wanting.
Implement contextual variable lookup and binding.
Add missing null checks.