Fit functions misbehaving

It’s possible I don’t understand the details of fit function syntax, but this seems to be a bug to me:
I have 2 functions that are identical, but one has a background added. I can’t seem to set constraints in the function with background (ValueError: ParamFunction LinearBackground does not have parameter (f0.Centre).) although as far as I can tell this should be unchanged by adding the background.

I’m running the nightly (5.0.20200909.1539) on macOS 10.13.6

from mantid.simpleapi import *
import matplotlib.pyplot as plt
import numpy as np

d = DeltaFunction(Height=1, Centre=0)
r = Resolution(Workspace = 'resolution')
l = Lorentzian(Amplitude = 50., PeakCentre = 0.0, FWHM = 0.05)
lin = LinearBackground(A0=0.3)

DelLor = CompositeFunction(Convolution(r,(d+l)))
DelLor.tie({'f0.f1.f0.Centre' : 'f0.f1.f1.PeakCentre'})

DelLorBG = CompositeFunction(Convolution(r,(d+l)) + lin)
DelLorBG.tie({'f0.f1.f0.Centre' : 'f0.f1.f1.PeakCentre'})

Never mind - re-read when posting and realised it’s all my fault.

in case anyone is searching for the same thing, the syntax should be:

DelLorBG = CompositeFunction(Convolution(r,(d+l))) + lin

NOT:

DelLorBG = CompositeFunction(Convolution(r,(d+l)) + lin)

Please delete / move as appropriate since not a bug.

Alway useful to learn from each other on the forum! I have found this confusing.

Out of interest was there any documentation you were looking at when writing this (which we could make more clear!! ) or just randomly testing??

The documentation I used is here:
https://docs.mantidproject.org/nightly/concepts/FitFunctionsInPython.html#fitfunctionsinpython

Setting constraints in simple functions is easy, but it can be hard to keep track of function names with the f0.f1.fn structure for more complex functions.