On a 404, specify the parent package if it exists

Fixes #4340. The error gets a `parent` property, and the message output displays
that.