JBIDE-16505 - did not remove deployment marker when module removed

JBIDE-16505 test case

Changes as requested from PR comments

Changes as requested from PR comments

Changes as requested from PR comments