Cast keys recursively including iterables (issue 1639 syntax error)