Added test case to issue #2384.
(cherry picked from commit 91a622d8d73a7b5dfe0a75c52154fb6e21c91517)