Indeed the current implementation of PCA for flattening is problematic when run on multiple trials: a sign issue leads to cancellations. This should be fixed hopefully soon.
@Francois, if you have a chance to look at the description of PR559, please let me know if the approach makes sense or if you have a better idea. I was hoping for feedback before continuing working on it.