Fix bug when setting once removed attribute has no effect.
Fix bug when setting once removed attribute has no effect.

gaurav1981/KeepLayout,iMartinKiss/KeepLayout,K-Be/KeepLayout,K-Be/KeepLayout,Tricertops/KeepLayout,Tricertops/KeepLayout