Fix / tests for #6363

https://github.com/zendframework/zf2/issues/6363
I came across this issue myself today and just moving everything inside the else block to outside fixed the issue for me...if you do that the is_array check won't be necessary.