I’m just going by the ESPN trade checker which is usually way ahead of the game on placing appropriate restrictions on deals.I'm not sure Mudiay's salary is considered valid matching salary given that he is on a minimum contract:
However, I *THINK* outgoing salaries are, thus making your idea work:
from: http://www.cbafaq.com/salarycap.htm#Q88
Anyone with better knowledge wanna chime in here?