Fix clear shader replacement issue
The replacement would never be erased because of a faulty if check. Added test code to the relevant tests for regression testing in the future.
The replacement would never be erased because of a faulty if check. Added test code to the relevant tests for regression testing in the future.