Polish court to determine fate of department that acts independently of ruling party