Is there a reason for the strict test on equality? I'd suggest using `<=` to accept RecordSet's descendants.