Make error message more explicit about what the problem is

Apparently it still wasn't clear what the issue was, given we still got
issues opened on this problem. Make it even more explicit so people
hopefully read it all now and know how to solve it.
Use inflation functions consistently

We don't pass down the objectmemory to other similar methods, so don't
do it for this one either. Also move find_index to the header so it can
be inlined in places where it's used.
Use set inflated header helper where appropriate

We can use the set_inflated_header method in these two places instead of
writing the same code manually.