All of a given religion's buildings provide +2 hammers if that religion is the one associated with the Apostolic Palace. This bonus applies even if you were not the one who built the wonder.
In this case, the Apostolic Palace is Hindu, so no, it is not a bug.