Re #8357. Fix memory leaks in test.

Ensure Property objects returned by loadProperty are deleted after use.
Merge branch 'bugfix/8357_api_test_memory_leaks' into develop