Fixes removing properties with partial match, and adds tests for it.