check internal children against prefix rather than equality

Change-Id: I972a0fb4eb86dcafa230f82251d3f9c3cbed7f2b