Fix #83 - Incorrect loop check in ExtendedProperty

Fixing a couple of locations where loops accessed array
out of its bounds.

Credit to @avromf