More tests for rewriting.
Put order as the first parameter for rewrite (like every other user-exposed functions).