This is a prerequisite for the patch implementing SRFI-38, which I'll post next.