Ensure records belong to the domain_id supplied in the URL

Change-Id: I0587bfb937e42ab0c727c99020e9a81b1a61cdc9