Is it legal, yes. Is is challengable, probably.
When the garnishment was started, you were given the opportunity to challenge the application of the garnishment to the check. At that time, you should have filed a notice with the court stating that you were already under garnishment. The court, after investigating the amounts, etc. could have set aside the second one until the first was completed.
Without knowing all the facts (amounts, dates, etc.), I would suggest you contact the court that authorized the garnishment.