Fix SafeDynArrayFromVariant function for arrays with 1 element