Fix nesting transactions. Source: http://php.net/manual/en/pdo.begintransaction.php#109753