Fix use of mutable values as default function parameter value

Signed-off-by: Esben Haabendal <esben@haabendal.dk>