Added some nested tests for #518

Needs testing on windows