Fix #181 (work around Ruby bug 8315)