Fix setting layer attributes crashes on struct values