Pointer type checking on buffer var breaks buffer type casting

Have you found a solution to this? I am having the same trouble. Much appreciated!