Test for issue #17

test is failing with a stack overflow.
Simplified the test for #17
Added a test describing the root cause of #17
Do not set identical subcontextes (fixes #17)
Merge branch 'issue17' (fixes #17)