[#46929367] remove unscoped_belongs_to to fix 'stack level too deep' errors on oracle imports; re-implemented unscoped relations in a more sane way