Fix order of NetKAT choice compilation, and add a few unit tests