Fix potential crash looking up block_num

The root cause: `HashFunctions()` not looking at aligned instructions (`++`.)  But I added a couple other checks to be safe.

Thanks to this log:
http://forums.ppsspp.org/showthread.php?tid=3042&pid=19163#pid19163

-[Unknown]