The function below works as intended if it\'s instantiated only once, but if it\'s used twice with different parameters it blows up the compiler in weird ways. It seems to be a