Prevent is_subrecord iterating past the domain name itself.

Change-Id: I828f3ec6064e45c3428e96ce4c4fb8ead8827abf