Fixed #20433: Extract catalog compilation code from javascript_catalog view.
Merge pull request #1090 from zyegfryed/ticket_20433

Fixed #20433: extracted catalog compilation code from view.