Add tests for preserve_constants factor order