We have to have it as a separate function to prevent possible optimisations as we have to have pointer on the stack.