Check STOMP headers against ending backslash

Issue: SPR-12418
(cherry picked from commit 1803348)