Judge calls move "shenanigans." Cambridge will likely still be out millions of dollars in federal housing grants.