BUG-981: remove use of deprecated getPath()

Here we're only iterating through, so there's no need to get the
Collection.

Change-Id: I32f9005dafc8df8ae059bb5da2c6d57132749219
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 813c00f5fc36d37da26dd026ac02f2c1d0010879)
Signed-off-by: Robert Varga <rovarga@cisco.com>
Merge "BUG-981: remove use of deprecated getPath()" into stable/hydrogen