Revert "do not set is dirty for elements that are ignored"

This reverts commit 43e583d046b1c53bede6e68a7e52e3a4b889ce0f.
re-apply changes from 43e583d046b1c53bede6e68a7e52e3a4b889ce0f without the vast white-space changes created by the auto format in Visual Studio