Fixed incorrect instanceof check when looking for an ECollection