bugfix: recusivly register all base classes of records

There was a bug, that only the topmost base class was registered for each record.