Bug 903340. Make nsDisplayScrollInfoLayer::ShouldFlattenAway side-effect-free. r=tn