fix: prevent dangling references when calling prepare() on temporary ComposedFunctor
Came across this problem while playing around with some new tests.
Luckily, adding this check didn't show any problems in our current Functors.
Given that our current Functors are always owned by an algorithm, one would have to try quite hard to really run into this problem.
But especially in the Tests it could potentially be quite easy to run into weird and hard to debug behavior, which is why I'm proposing this change.
Edited by Christoph Hasse