This code is from @kenmazaika , but indeed this does not seem to be relevant. I'll remove that.

@kenmazaika please comment if this is needed.