Fix element set logic broken in dr-function merge