Worked around bug in F# compiler optimiser.