#2234: Fix typo to allow collectionrepeat on WP8

* Declare local variable item
* Fix test condition