Be a bit more defensive about how dict is loaded

When config is loaded but dict is not, these situations aren't properly
checked in code, resulting all sorts of weird memory access errors, more
strict checking could avoid these.