Fixes: #2427 Invalid value for shared scalar