Add transform_flatfields to cleanFilter. [1338]

There was also a second (apparently identical except for whitespace)
cleanFilter function that I’ve removed.