Fix wrong flat key position when using expression key for nested tuples