advise package.el function to handle trivial errors