AS7-6949 Don't read child resource twice; avoid NPE

Kabir needs to review this, as there may have been a reason for reading the child resource twice, in which case a slightly different fix is needed.