Refs: #4784 (cherry picked from commit a78b1aee)
(cherry picked from commit be6d445e)
(cherry picked from commit 2fac9836)