Issue 19453: Added currency id to the query in toBase function