Revert "Improved rewrite check"

This reverts commit 430f5dfcb6f4d2bd212ed487c12346856da850c0.