Add a test case using optional in generics

This crashes Swift type checker. Similar code works if `some` function with generic sequence is replaced with `some` function that works only with arrays.