4018 negative currency rebase

Re-doing pr #4018 with the necessary rebasing.