prevent the hash assignment handling on an empty hash Fixes #5442