rewrite_ifo: Off by one