Fixes #3010 Can't call method "val" on unblessed reference