diff --git a/simgear/nasal/cppbind/Ghost.hxx b/simgear/nasal/cppbind/Ghost.hxx
index 2d672097..9c2de3a3 100644
--- a/simgear/nasal/cppbind/Ghost.hxx
+++ b/simgear/nasal/cppbind/Ghost.hxx
@@ -374,7 +374,9 @@ namespace nasal
if( setter )
{
- typename boost::remove_reference::type
+ typename boost::remove_const
+ < typename boost::remove_reference::type
+ >::type
(*from_nasal_)(naContext, naRef) = &nasal::from_nasal;
// Setter signature: void(naContext, raw_type&, naRef)