HasContainer now supports key checking. More test cases.