Fix sometimes validation for nested arrays

Fixes not working 'sometimes' optional check for nested arrays.