Procedure calls with a mix of var and const parameters somewhat works