With aggregation command, expressions use shared Value instances across multiple threads. Such shared instances may be got using eg. Value::getTrue().
As mongo::Value is reference counted with mongo::IntrusiveCounter, operations on counter are not atomic. With two or more simultaneous aggregations being run this (may) results in freeing of shared values that are being used and thus strange errors like double free detected by glibc or assertions in Value::coerceToBool() for boolean Value. .
This 'bug' can be fixed by changing IntrusiveCounter's counter variable type to bson::AtomicUInt, which is ugly but works. Maybe the final fix shouldn't be so radical.