minor code cleanups
constant fold in-tests against empty containers

--HG--
extra : amend_source : 6fe9294d38a26b208899453b4a12739dcc496c16