Normally this requires a vendor change upstream, but we're upgrading the Kohana framework to Kohana 3 in the next big release so meh, I'm not going to worry about doing this change correctly.  I haven't used Xcache but your fix looks fine to me.