Fixed a bug in assertContainsOnly