Backed out changeset 829aa0bb9657

Error handling is not equivalent in the inlined version.