Add test for correct error reporting for a runtime error in a layout