CRM-12791 : pseudoconstant replacement handling, and minor improvements
Merge pull request #1013 from pratik-joshi/CRM-12791-minor-fixes

CRM-12791 : pseudoconstant replacement handling, and minor improvements