Fix critical on invalid element access
Fix critical on invalid element access

Fixes bug 590339.

GNOME/vala,playya/vala,severinh/vala,kamanashisroy/aroop,Distrotech/vala,jessevdk/vala,frida/vala,playya/vala,tjol/vala-tjol,severinh/vala,spidermonkdust/vala,rvu95/vala,lovebug356/vala,themiwi/vala,Distrotech/vala,tjol/vala-tjol,Distrotech/vala,rvu95/vala,tjol/vala-tjol,flobrosch/vala-fixes,xdave/pvala,GNOME/vala,frida/vala,GNOME/vala,Jc2k/vala,rvu95/vala,flobrosch/vala-fixes,phako/vala,frida/vala,jessevdk/vala,spidermonkdust/vala,playya/vala,frida/vala,jessevdk/vala,flobrosch/vala-fixes,spidermonkdust/vala,kamanashisroy/aroop,GNOME/vala,frida/vala,Jc2k/vala,kamanashisroy/aroop,themiwi/vala,themiwi/vala,phako/vala,severinh/vala,lovebug356/vala