reverting r45444 to disentangle modules and make porting possible