I don’t think the government did anything wrong; The rules aren’t meant to be bent, and if Lucas made a mistake in filing the wrong paperwork, it absolutely makes sense for the consequences to follow. In these serious legal matters, you need to seek counsel. This article attempts to paint a picture of the poor child, but the law was clear, and any emotional appeal should be invalid.
I think that rather depends on whether you regard the role of government here to assist its (future) citizens, or censure them (narrowly avoiding arrest and detention in this case) for what appear to be minor violations of immigration law.