Correctly filter out BasicObject subclasses

This was throwing off our ObjectSpace call