Minimal fix for #4631 -- set implicit classes as in 0.25.x
This is a minimal fix for #4631 by reversing one part of the refactor for #1903
commit 0d4fd60c7c143cc1f4e4b0f99f359c09cbfbf21e. It fixes the immediate issue
(implicit classes not being added to resources) but leaves open several other
questions which are defered to #4687.