Weird compilation behaviour