fix a crash (and incorrect output) when a property has its own properties (#697)