Serial is consumed inside of transaction block when transaction fails

Let’s have a workflow with transaction behaviour Ignore and let’s have an atomic transaction block inside of it. Let’s perform following transformation inside the block:

<xsl:stylesheet xmlns:xsl="" version="1.0"
	xmlns:date="" exclude-result-prefixes="AS date">

	<xsl:template match="/">
			Lookup="{AS:LookupValue('fb264a02-2308-4e80-b789-cd40da44b7c1', '')}"/>

The attribute Serial consumes counter, but attribute Lookup causes failure because there’s no value provided to lookup. As a result the workflow fails, but the counter remains incremented.

I’d expect counter to not be consumed.

An observation

The problem happens only in this specific setup. If the workflow transaction behaviour is InheritExisting, the counter is not consumed.