Allow specifying retraction length for layer changes.