Exceptions regarding existing active transactions were thrown while I was almost certain sufficient checks were in place.However, I quickly found out that a strict boolean comparison to PDO::inTransaction() was failing.

Using var_dump I learned that this function was returning integers, not boolean values.