Add test for previous bug, partial fix for casts