BUG: now filtering out observed nodes in _partial_optimize

Hi Thomas,

As we discussed by email.

Best,
Dan