PROTON-576: updates to bring things into line with the patch on the JIRA, rather than a stale older version I actually applied (not having a good day :P)