add test for deeper-level rewrite
todo