Fix segfault when loading malformed ELF, improve invalid sections loading