ISPN-3526 Inject dependecies into the marshaller used for compatibility mode

Also cleanup related tests.