[#1390] Move context definition to prevent exception
Merge pull request #1390 from okfn/1390-group_dictize-exception

Exception on group dictize due to 'with_capacity' on context