Fix some content rule bugs in repository preprocessor