This patch was prepared by Amir Szekely and fixes issue #2353. So far, the remove method would only ever check the first entry in the list of targets for a node.
As also reported by Robert Zeigler in a recent mail on the user ML, users expect to be able to set the "noclean" flag for each single target. This behaviour is also in sync with our current documentation.
thanks for your comments and the approval. I updated the pull request by switching the argument "remove" to type bool.
I'm not sure that I understand your comment about testing former behaviour. This a fix, which is supposed to change behaviour. So, if we would test the former behaviour, this would mean that the test would always break after the patch got applied.
Instead, it's the other way round: the test breaks before applying the patch...but succeeds afterwards.