Make aof rewrite work with nds